Remove useless format calls from tests
authorAleksey Kladov <aleksey.kladov@gmail.com>
Mon, 30 May 2016 22:41:36 +0000 (01:41 +0300)
committerAleksey Kladov <aleksey.kladov@gmail.com>
Mon, 30 May 2016 22:54:26 +0000 (01:54 +0300)
tests/net-config.rs
tests/package.rs
tests/test.rs

index d4fdb3b1279ace71a86af076abb08842919477ad..deb9ff940a9a2da56d0daa032cf443712cd11cac 100644 (file)
@@ -7,7 +7,7 @@ use hamcrest::assert_that;
 #[test]
 fn net_retry_loads_from_config() {
     let p = project("foo")
-        .file("Cargo.toml", &format!(r#"
+        .file("Cargo.toml", r#"
             [project]
             name = "foo"
             version = "0.0.1"
@@ -15,7 +15,7 @@ fn net_retry_loads_from_config() {
 
             [dependencies.bar]
             git = "https://127.0.0.1:11/foo/bar"
-        "#))
+        "#)
         .file("src/main.rs", "").file(".cargo/config", r#"
         [net]
         retry=1
@@ -25,14 +25,14 @@ fn net_retry_loads_from_config() {
 
     assert_that(p.cargo_process("build").arg("-v"),
                 execs().with_status(101)
-                .with_stderr_contains(&format!("[WARNING] spurious network error \
-(1 tries remaining): [2/-1] [..]")));
+                .with_stderr_contains("[WARNING] spurious network error \
+(1 tries remaining): [2/-1] [..]"));
 }
 
 #[test]
 fn net_retry_git_outputs_warning() {
     let p = project("foo")
-        .file("Cargo.toml", &format!(r#"
+        .file("Cargo.toml", r#"
             [project]
             name = "foo"
             version = "0.0.1"
@@ -40,7 +40,7 @@ fn net_retry_git_outputs_warning() {
 
             [dependencies.bar]
             git = "https://127.0.0.1:11/foo/bar"
-        "#))
+        "#)
         .file(".cargo/config", r#"
         [http]
         timeout=1
@@ -49,8 +49,8 @@ fn net_retry_git_outputs_warning() {
 
     assert_that(p.cargo_process("build").arg("-v").arg("-j").arg("1"),
                 execs().with_status(101)
-                .with_stderr_contains(&format!("[WARNING] spurious network error \
-(2 tries remaining): [2/-1] [..]"))
-                .with_stderr_contains(&format!("\
-[WARNING] spurious network error (1 tries remaining): [2/-1] [..]")));
+                .with_stderr_contains("[WARNING] spurious network error \
+(2 tries remaining): [2/-1] [..]")
+                .with_stderr_contains("\
+[WARNING] spurious network error (1 tries remaining): [2/-1] [..]"));
 }
index f9a810fb43871d9232fc6ccc047ddad14edc1f3b..7bc7dcdfe94ab59362a4d6775488eb3bd8db3eb5 100644 (file)
@@ -108,7 +108,7 @@ http://doc.crates.io/manifest.html#package-metadata for more info.
         dir = p.url())));
 
     let p = project("all")
-        .file("Cargo.toml", &format!(r#"
+        .file("Cargo.toml", r#"
             [project]
             name = "foo"
             version = "0.0.1"
@@ -116,7 +116,7 @@ http://doc.crates.io/manifest.html#package-metadata for more info.
             license = "MIT"
             description = "foo"
             repository = "bar"
-        "#))
+        "#)
         .file("src/main.rs", r#"
             fn main() {}
         "#);
index 9614989008494432598bdc48056204850abc96d2..11a2cc54c9fb321463fbf6e905ac40a71dc9cf2d 100644 (file)
@@ -2115,9 +2115,9 @@ fn only_test_docs() {
 
     assert_that(p.cargo("test").arg("--doc"),
                 execs().with_status(0)
-                       .with_stderr(&format!("\
+                       .with_stderr("\
 [COMPILING] foo v0.0.1 ([..])
-[DOCTEST] foo"))
+[DOCTEST] foo")
                        .with_stdout("
 running 1 test
 test bar_0 ... ok